<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户管理 - 拖拽式建站平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        :root {
            --sidebar-width: 240px;
            --header-height: 64px;
            --primary-color: #3498db;
            --secondary-color: #2c3e50;
            --bg-color: #f5f6f7;
            --card-bg: #ffffff;
            --text-primary: #18191c;
            --text-secondary: #61666d;
            --text-muted: #9499a0;
            --border-color: #e3e5e7;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* 顶部导航栏 */
        .header {
            height: var(--header-height);
            background: var(--card-bg);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            border-bottom: 1px solid var(--border-color);
            z-index: 100;
        }

        .header-left {
            display: flex;
            align-items: center;
        }

        .sidebar-toggle {
            margin-right: 16px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 18px;
        }

        .logo {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
            color: var(--primary-color);
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .header-action {
            margin-left: 16px;
            color: var(--text-secondary);
            cursor: pointer;
            position: relative;
        }

        .header-action:hover {
            color: var(--primary-color);
        }

        .badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger-color);
            color: white;
            font-size: 11px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-menu {
            display: flex;
            align-items: center;
            margin-left: 20px;
            cursor: pointer;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 12px;
        }

        /* 主内容区域 */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* 侧边栏 */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--card-bg);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        .sidebar-menu {
            padding: 16px 0;
        }

        .menu-title {
            padding: 10px 20px;
            font-size: 13px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .menu-item:hover {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
        }

        .menu-item.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            border-left-color: var(--primary-color);
        }

        .menu-item i {
            margin-right: 12px;
            width: 18px;
            text-align: center;
        }

        /* 内容区域 */
        .content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .page-title {
            font-size: 24px;
            font-weight: 600;
        }

        .page-actions .btn {
            margin-left: 10px;
        }

        /* 筛选和搜索区域 */
        .filter-bar {
            background: var(--card-bg);
            border-radius: 4px;
            padding: 16px 20px;
            margin-bottom: 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: center;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .search-box {
            position: relative;
            flex: 1;
            min-width: 200px;
        }

        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 14px;
        }

        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }

        .filter-group {
            display: flex;
            align-items: center;
        }

        .filter-label {
            font-size: 14px;
            color: var(--text-secondary);
            margin-right: 8px;
        }

        .filter-select {
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: white;
            font-size: 14px;
            min-width: 120px;
        }

        /* 用户列表区域 */
        .users-container {
            display: flex;
            flex: 1;
            gap: 20px;
        }

        /* 用户列表 */
        .users-list {
            flex: 1;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
        }

        .list-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .list-title {
            font-size: 16px;
            font-weight: 500;
        }

        .list-count {
            font-size: 14px;
            color: var(--text-muted);
        }

        .users-items {
            overflow-y: auto;
            flex: 1;
        }

        .user-item {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background 0.3s ease;
            display: flex;
            align-items: center;
        }

        .user-item:hover {
            background: rgba(52, 152, 219, 0.05);
        }

        .user-item.selected {
            background: rgba(52, 152, 219, 0.1);
            border-right: 3px solid var(--primary-color);
        }

        .user-avatar-small {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .user-info {
            flex: 1;
        }

        .user-name {
            font-weight: 500;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
        }

        .user-email {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }

        .user-meta {
            display: flex;
            align-items: center;
            font-size: 13px;
            color: var(--text-secondary);
            flex-wrap: wrap;
        }

        .user-meta-item {
            display: flex;
            align-items: center;
            margin-right: 16px;
        }

        .user-meta-item i {
            margin-right: 4px;
        }

        .user-status {
            display: flex;
            align-items: center;
            margin-top: 8px;
        }

        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-active {
            background: rgba(39, 174, 96, 0.1);
            color: var(--success-color);
        }

        .status-inactive {
            background: rgba(243, 156, 18, 0.1);
            color: var(--warning-color);
        }

        .status-banned {
            background: rgba(231, 76, 60, 0.1);
            color: var(--danger-color);
        }

        .role-badge {
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 11px;
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            margin-left: 8px;
        }

        /* 用户详情区域 */
        .user-detail {
            flex: 2;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            min-width: 400px;
        }

        .detail-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .detail-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .detail-name {
            font-size: 20px;
            font-weight: 600;
        }

        .detail-actions {
            display: flex;
            gap: 8px;
        }

        .detail-profile {
            display: flex;
            align-items: center;
            margin-bottom: 16px;
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            margin-right: 20px;
            flex-shrink: 0;
        }

        .profile-info {
            flex: 1;
        }

        .profile-name {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .profile-email {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .profile-status {
            display: flex;
            align-items: center;
        }

        .detail-meta {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

        .meta-item {
            display: flex;
            flex-direction: column;
        }

        .meta-label {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .meta-value {
            font-size: 14px;
            font-weight: 500;
        }

        .detail-content {
            padding: 20px;
            flex: 1;
            overflow-y: auto;
        }

        .detail-section {
            margin-bottom: 24px;
        }

        .section-title {
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 16px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
        }

        .section-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 20px;
        }

        .stat-item {
            background: #f9fafc;
            border-radius: 4px;
            padding: 16px;
            text-align: center;
        }

        .stat-value {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 4px;
            color: var(--primary-color);
        }

        .stat-label {
            font-size: 13px;
            color: var(--text-muted);
        }

        .roles-list {
            list-style: none;
        }

        .role-item {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .role-item:last-child {
            border-bottom: none;
        }

        .role-info {
            display: flex;
            align-items: center;
        }

        .role-info i {
            margin-right: 8px;
            color: var(--primary-color);
        }

        .role-actions {
            display: flex;
            gap: 8px;
        }

        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn i {
            margin-right: 6px;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background: #2980b9;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .btn-outline:hover {
            background: #f5f7fa;
        }

        .btn-success {
            background: var(--success-color);
            color: white;
        }

        .btn-success:hover {
            background: #219653;
        }

        .btn-danger {
            background: var(--danger-color);
            color: white;
        }

        .btn-danger:hover {
            background: #c0392b;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 13px;
        }

        .btn-icon {
            width: 32px;
            height: 32px;
            padding: 0;
            justify-content: center;
        }

        .btn-icon i {
            margin-right: 0;
        }

        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-muted);
        }

        .empty-state i {
            font-size: 48px;
            margin-bottom: 16px;
            color: #d1d5db;
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .users-container {
                flex-direction: column;
            }

            .user-detail {
                min-width: auto;
            }

            .sidebar {
                position: fixed;
                left: -var(--sidebar-width);
                top: var(--header-height);
                bottom: 0;
                z-index: 90;
            }

            .sidebar.open {
                left: 0;
            }

            .overlay {
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 80;
                display: none;
            }

            .overlay.open {
                display: block;
            }
        }

        @media (max-width: 768px) {
            .filter-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .search-box {
                min-width: auto;
            }

            .filter-group {
                width: 100%;
                justify-content: space-between;
            }

            .detail-meta {
                grid-template-columns: 1fr;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            .detail-profile {
                flex-direction: column;
                text-align: center;
            }

            .profile-avatar {
                margin-right: 0;
                margin-bottom: 16px;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .page-actions {
                margin-top: 16px;
                width: 100%;
                display: flex;
                justify-content: space-between;
            }

            .page-actions .btn {
                margin-left: 0;
                flex: 1;
                margin: 0 5px;
            }
        }
    </style>
</head>

<body>
    <!-- 顶部导航栏 -->
    <div class="header">
        <div class="header-left">
            <div class="sidebar-toggle">
                <i class="fas fa-bars"></i>
            </div>
            <div class="logo">
                <i class="fas fa-puzzle-piece"></i>
                拖拽建站后台
            </div>
        </div>

        <div class="header-right">
            <div class="header-action">
                <i class="fas fa-bell"></i>
                <span class="badge">3</span>
            </div>

            <div class="header-action">
                <i class="fas fa-envelope"></i>
                <span class="badge">5</span>
            </div>

            <div class="user-menu">
                <span>管理员</span>
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- 主内容区域 -->
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-menu">
                <div class="menu-title">主导航</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-home"></i>
                    <span>控制台</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-paint-brush"></i>
                    <span>网站管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-file-alt"></i>
                    <span>页面管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-th-large"></i>
                    <span>组件库</span>
                </a>

                <div class="menu-title">内容管理</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-newspaper"></i>
                    <span>文章管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-box"></i>
                    <span>产品管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-images"></i>
                    <span>媒体库</span>
                </a>

                <div class="menu-title">用户与权限</div>
                <a href="#" class="menu-item active">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-shield-alt"></i>
                    <span>角色权限</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                </a>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="content">
            <div class="page-header">
                <h1 class="page-title">用户管理</h1>
                <div class="page-actions">
                    <button class="btn btn-outline">
                        <i class="fas fa-download"></i> 导出数据
                    </button>
                    <button class="btn btn-primary">
                        <i class="fas fa-plus"></i> 添加用户
                    </button>
                </div>
            </div>

            <!-- 筛选和搜索区域 -->
            <div class="filter-bar">
                <div class="search-box">
                    <i class="fas fa-search search-icon"></i>
                    <input type="text" class="search-input" placeholder="搜索用户名或邮箱...">
                </div>

                <div class="filter-group">
                    <span class="filter-label">状态:</span>
                    <select class="filter-select">
                        <option>全部状态</option>
                        <option>活跃</option>
                        <option>未激活</option>
                        <option>已禁用</option>
                    </select>
                </div>

                <div class="filter-group">
                    <span class="filter-label">角色:</span>
                    <select class="filter-select">
                        <option>全部角色</option>
                        <option>管理员</option>
                        <option>编辑者</option>
                        <option>作者</option>
                        <option>订阅者</option>
                    </select>
                </div>

                <div class="filter-group">
                    <span class="filter-label">排序:</span>
                    <select class="filter-select">
                        <option>最近活跃</option>
                        <option>注册时间</option>
                        <option>用户名</option>
                    </select>
                </div>

                <button class="btn btn-outline">
                    <i class="fas fa-filter"></i> 筛选
                </button>
            </div>

            <!-- 用户列表和详情区域 -->
            <div class="users-container">
                <!-- 用户列表 -->
                <div class="users-list">
                    <div class="list-header">
                        <div class="list-title">用户列表</div>
                        <div class="list-count">248个用户</div>
                    </div>

                    <div class="users-items">
                        <div class="user-item selected">
                            <div class="user-avatar-small">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-info">
                                <div class="user-name">
                                    张三
                                    <span class="role-badge">管理员</span>
                                </div>
                                <div class="user-email">zhangsan@example.com</div>
                                <div class="user-meta">
                                    <div class="user-meta-item">
                                        <i class="fas fa-calendar"></i> 2023-01-15
                                    </div>
                                    <div class="user-meta-item">
                                        <i class="fas fa-globe"></i> 12个网站
                                    </div>
                                </div>
                                <div class="user-status">
                                    <span class="status-badge status-active">活跃</span>
                                </div>
                            </div>
                        </div>

                        <div class="user-item">
                            <div class="user-avatar-small">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-info">
                                <div class="user-name">
                                    李四
                                    <span class="role-badge">编辑者</span>
                                </div>
                                <div class="user-email">lisi@example.com</div>
                                <div class="user-meta">
                                    <div class="user-meta-item">
                                        <i class="fas fa-calendar"></i> 2023-03-22
                                    </div>
                                    <div class="user-meta-item">
                                        <i class="fas fa-globe"></i> 5个网站
                                    </div>
                                </div>
                                <div class="user-status">
                                    <span class="status-badge status-active">活跃</span>
                                </div>
                            </div>
                        </div>

                        <div class="user-item">
                            <div class="user-avatar-small">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-info">
                                <div class="user-name">
                                    王五
                                    <span class="role-badge">作者</span>
                                </div>
                                <div class="user-email">wangwu@example.com</div>
                                <div class="user-meta">
                                    <div class="user-meta-item">
                                        <i class="fas fa-calendar"></i> 2023-05-10
                                    </div>
                                    <div class="user-meta-item">
                                        <i class="fas fa-globe"></i> 2个网站
                                    </div>
                                </div>
                                <div class="user-status">
                                    <span class="status-badge status-inactive">未激活</span>
                                </div>
                            </div>
                        </div>

                        <div class="user-item">
                            <div class="user-avatar-small">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-info">
                                <div class="user-name">
                                    赵六
                                    <span class="role-badge">订阅者</span>
                                </div>
                                <div class="user-email">zhaoliu@example.com</div>
                                <div class="user-meta">
                                    <div class="user-meta-item">
                                        <i class="fas fa-calendar"></i> 2023-06-18
                                    </div>
                                    <div class="user-meta-item">
                                        <i class="fas fa-globe"></i> 1个网站
                                    </div>
                                </div>
                                <div class="user-status">
                                    <span class="status-badge status-banned">已禁用</span>
                                </div>
                            </div>
                        </div>

                        <div class="user-item">
                            <div class="user-avatar-small">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-info">
                                <div class="user-name">
                                    钱七
                                    <span class="role-badge">编辑者</span>
                                </div>
                                <div class="user-email">qianqi@example.com</div>
                                <div class="user-meta">
                                    <div class="user-meta-item">
                                        <i class="fas fa-calendar"></i> 2023-07-05
                                    </div>
                                    <div class="user-meta-item">
                                        <i class="fas fa-globe"></i> 3个网站
                                    </div>
                                </div>
                                <div class="user-status">
                                    <span class="status-badge status-active">活跃</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 用户详情 -->
                <div class="user-detail">
                    <div class="detail-header">
                        <div class="detail-title">
                            <div class="detail-name">用户详情</div>
                            <div class="detail-actions">
                                <button class="btn btn-icon btn-outline" title="编辑">
                                    <i class="fas fa-edit"></i>
                                </button>
                                <button class="btn btn-icon btn-outline" title="更多">
                                    <i class="fas fa-ellipsis-v"></i>
                                </button>
                            </div>
                        </div>

                        <div class="detail-profile">
                            <div class="profile-avatar">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="profile-info">
                                <div class="profile-name">张三</div>
                                <div class="profile-email">zhangsan@example.com</div>
                                <div class="profile-status">
                                    <span class="status-badge status-active">活跃</span>
                                    <span class="role-badge">管理员</span>
                                </div>
                            </div>
                        </div>

                        <div class="detail-meta">
                            <div class="meta-item">
                                <span class="meta-label">用户ID</span>
                                <span class="meta-value">USR-20230115-001</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">注册时间</span>
                                <span class="meta-value">2023-01-15 14:30</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">最后登录</span>
                                <span class="meta-value">2023-09-05 09:15</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">登录IP</span>
                                <span class="meta-value">192.168.1.100</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">手机号码</span>
                                <span class="meta-value">138****1234</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">所属团队</span>
                                <span class="meta-value">技术部</span>
                            </div>
                        </div>
                    </div>

                    <div class="detail-content">
                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-chart-line"></i>
                                用户统计
                            </div>

                            <div class="stats-grid">
                                <div class="stat-item">
                                    <div class="stat-value">12</div>
                                    <div class="stat-label">创建的网站</div>
                                </div>
                                <div class="stat-item">
                                    <div class="stat-value">47</div>
                                    <div class="stat-label">发布的页面</div>
                                </div>
                                <div class="stat-item">
                                    <div class="stat-value">128</div>
                                    <div class="stat-label">编辑次数</div>
                                </div>
                            </div>

                            <button class="btn btn-outline">
                                <i class="fas fa-external-link-alt"></i> 查看详细统计
                            </button>
                        </div>

                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-shield-alt"></i>
                                角色权限
                            </div>

                            <ul class="roles-list">
                                <li class="role-item">
                                    <div class="role-info">
                                        <i class="fas fa-user-cog"></i>
                                        超级管理员
                                    </div>
                                    <div class="role-actions">
                                        <button class="btn btn-sm btn-outline">编辑</button>
                                    </div>
                                </li>
                                <li class="role-item">
                                    <div class="role-info">
                                        <i class="fas fa-edit"></i>
                                        内容编辑者
                                    </div>
                                    <div class="role-actions">
                                        <button class="btn btn-sm btn-outline">编辑</button>
                                    </div>
                                </li>
                                <li class="role-item">
                                    <div class="role-info">
                                        <i class="fas fa-eye"></i>
                                        内容查看者
                                    </div>
                                    <div class="role-actions">
                                        <button class="btn btn-sm btn-outline">编辑</button>
                                    </div>
                                </li>
                            </ul>

                            <button class="btn btn-outline" style="margin-top: 12px;">
                                <i class="fas fa-plus"></i> 分配新角色
                            </button>
                        </div>

                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-cogs"></i>
                                用户操作
                            </div>

                            <div style="display: flex; gap: 12px; flex-wrap: wrap;">
                                <button class="btn btn-success">
                                    <i class="fas fa-check"></i> 激活用户
                                </button>
                                <button class="btn btn-outline">
                                    <i class="fas fa-key"></i> 重置密码
                                </button>
                                <button class="btn btn-outline">
                                    <i class="fas fa-envelope"></i> 发送消息
                                </button>
                                <button class="btn btn-danger">
                                    <i class="fas fa-ban"></i> 禁用账户
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 移动端遮罩层 -->
    <div class="overlay"></div>

    <script>
        document.addEventListener('DOMContentLoaded', function () {
            // 侧边栏切换
            const sidebarToggle = document.querySelector('.sidebar-toggle');
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.overlay');

            sidebarToggle.addEventListener('click', function () {
                sidebar.classList.toggle('open');
                overlay.classList.toggle('open');
            });

            overlay.addEventListener('click', function () {
                sidebar.classList.remove('open');
                overlay.classList.remove('open');
            });

            // 用户列表项选择
            const userItems = document.querySelectorAll('.user-item');

            userItems.forEach(item => {
                item.addEventListener('click', function () {
                    userItems.forEach(i => i.classList.remove('selected'));
                    this.classList.add('selected');

                    // 这里可以添加加载用户详情的代码
                    // loadUserDetails(this.dataset.userId);
                });
            });

            // 模拟数据加载
            function loadUserDetails(userId) {
                console.log('加载用户详情: ', userId);
                // 实际应用中这里会发送API请求获取用户详情
            }
        });
    </script>
</body>

</html>